package com.tsingteng.cosfun.ui.setting;

import com.tsingteng.cosfun.bean.ThirdBindBean;
import com.tsingteng.cosfun.bean.UserBean;
import com.tsingteng.cosfun.callback.RxObserver;
import com.tsingteng.cosfun.http.RxSchedulers;
import com.tsingteng.cosfun.mvp.module.BaseModel;

/**
 * 描述 :
 * 创建人: 肖利.
 * 时间:2018/8/22
 * qq(872179966)
 */

public class AccountMangeModel extends BaseModel implements IAccountMangeModel{
    @Override
    public void getThirdBind(String thirdparty_token, String login_type, String nickname, String headpic, String open_id, RxObserver<ThirdBindBean> callback) {
        doRxRequest().getThirdBind(thirdparty_token,login_type,nickname,headpic,open_id).compose(RxSchedulers.io_main()).subscribe(callback);
    }

    @Override
    public void getAccountMangeMentData(String profileId,RxObserver<ThirdBindBean> callback) {
        doRxRequest().getAccountMangeMent().compose(RxSchedulers.io_main()).subscribe(callback);
    }

    @Override
    public void getThirdUnBind(String untie_type, RxObserver<Integer> callback) {
        doRxRequest().getThirdUnBind(untie_type).compose(RxSchedulers.io_main()).subscribe(callback);
    }

    @Override
    public void getMobileBind(String mobile, String verify_code, String timestamp, String bound_type, RxObserver<Object> callback) {
        doRxRequest().getMobileBind(mobile,verify_code,timestamp,bound_type).compose(RxSchedulers.io_main()).subscribe(callback);
    }

    /**
     * 验证码
     * @param mobile
     * @param verifyType
     * @param timestamp
     * @param callback
     */
    @Override
    public void verfyCode(String mobile, String verifyType, String timestamp, RxObserver<UserBean> callback) {
        doRxRequest().verifyCode(mobile,verifyType,timestamp).compose(RxSchedulers.io_main()).subscribe(callback);
    }
}
